Error when writing in new file

by: Etuag, 8 years ago

Last edited: 8 years ago

HI,

Im new to python.
I desided to follow the Beginner tutorial and the first 2 sessions was fine.
Then i tride the math part. I opend IDLE, opend a new window and wrote  3+1, F5 and saved it.

At this point i get == RESTART: C:/Users/xxxx and so on.

I`ve tried to google it but what i find is not relevant as far as I can see. I`ve also tried to reinstall Python incase I had done something wrong when installing.

Nothing seems to help. Can someone help?

BR

Edit: Everything seems to work fine when i open IDLE i can type and do 3+1 and get the respnse i expect but when i open a new file the problem starts.



You must be logged in to post. Please login or register an account.



I've never heard of an error like this, no idea what would cause such a thing.

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.

Hi,
something like that happend to me under Mac Os.
Beside python itself there is the tk/tkinter software, responsible for the grafic,
which is used by Idle.
So if You are using mac just try to install the right version of tcl .
https://www.python.org/download/mac/tcltk/








-gerpark 8 years ago

You must be logged in to post. Please login or register an account.

Hello,

When you first open IDLE, you have a Python interactive shell, so if you type 3+1 and hit enter, it will automatically print out the result. However, you have created a new file. Because you are now running a Python file than running code in the interactive shell, it will not automatically print out the result. You need to print out the result, like:

print(3+1)


Hope that works for you!

-jstoate 8 years ago
Last edited 8 years ago

You must be logged in to post. Please login or register an account.


Thank you. That solved it :).

-Etuag 8 years ago

You must be logged in to post. Please login or register an account.